<?php session_start();
if ( isset ($_POST["deco"]))
{
    setcookie("goldname", $_SESSION["login"], time()-10);
    unset ($_SESSION["login"]);
    unset ($_SESSION["id_user"]);

}
elseif ( isset ($_COOKIE["goldname"]))
{
    $_SESSION["login"] = $_COOKIE["goldname"];
	 echo '<script language="Javascript">

document.location.replace("'.$url.'main.php");

</script>';
}
?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>Infinity</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Description" content="Florent di Bartolo Project Infinity" />
		<link rel="stylesheet" type="text/css" href="dibartolo/css/infinity.css" />
		<script type="text/javascript" src="dibartolo/js/swfobject.js"></script>
		<script type="text/javascript">
			var flashvars = {};
			var params = {};
			params.menu = "true";
			params.quality = "high";
			params.scale = "noborder";
			params.salign = "lt";
			params.wmode = "window";
			params.bgcolor = "#FFFFFF";
			params.allowfullscreen = "false";
			params.allowscriptaccess = "sameDomain";
			var attributes = {};
			attributes.id = "infine";
			attributes.name = "infine";
			attributes.align = "middle";
			swfobject.embedSWF("dibartolo/intro.swf", "myAlternativeContent", "100%", "100%", "10.0.0", false, flashvars, params, attributes);
		</script>
		<script type="text/javascript" language="javascript" src="./js/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" language="javascript" src="./js/function.js"></script>
        <script type="text/javascript" src="./ajaxfileupload/ajaxfileupload.js"></script>
	</head>
	<script type="text/javascript">
	
		function changeBG(){
			
			var backColour = new Array();
			backColour = ["#ffcccc", "#ffff99", "#333399", "#333366", "#99ff00", "#00ccff",
            "#993366", "#ffffcc", "#0066cc", "#ff3399", "#66ffff", "#ffccff", "#cc3333",
            "#336633", "#003300", "#66ccff", "#ffcc00", "#333399", "#ffcc99", "#ffcccc",
            "#333333", "#ffff00", "#ff6699", "#ff6666", "#cc3366", "#006633", "#009966"]; 
			
			var num= Math.floor(Math.random()*backColour.length);
	
			document.body.getElementsByTagName("form")[0].style.backgroundColor = backColour[num];
	}
	

	</script>
	
	
	<body>
	<!--<body onload="changeBG();">-->
		<div id="logmachine">
 	<div id="header">
            	<?php include "./php/url.php";
                echo '<span class="l1"><a href="'.$url.'" alt="Infinity">Infinity</a></span>'; ?>
        </div>
        <div id="banniere">
        	<div id="banmenu">
        	
            <?php

            function formulaire_login(){
            	            
                echo '
                <form method="post" action="main.php">
                <fieldset><!--<legend>Identification</legend>-->
                
                <label for="login"><span>Login</span>
                <input type="text" id="login" name="login" /></label>
                
                <label for="pass"><span>Mot de Passe</span>
                <input type="password" id="pass" name="pass" /></label>
                
                <label for="remember"><span>Se Souvenir de Moi</span>
                <input type="checkbox" id="remember" name="remember" /></label>

                </fieldset>
                
                <div><input type="submit" value="Connexion" name="connexion" /></div>
                
                </form>';

            }
            
            
            if ( isset ($_GET["status"])){
            	
            	if ($_GET['status'] == "new"){

            		echo '
            		<form onsubmit="f_save_compte(); return false;">
            		
            		<fieldset id="new_compte"><!--<legend>Nouveau compte</legend>-->
            		
            		<label for="login"><span>Login</span>
                	<input type="text" id="login" name="login" onBlur="f_verif_form(\"login\")" /></label>
                	
                	<label for="pass"><span>Mot de Passe</span>
                	<input type="text" id="pass" name="pass" onBlur="f_verif_form(\"pass\")" /></label>

                	<label for="mail"><span>Email</span>
                	<input type="text" id="mail" name="mail" onBlur="f_verif_form(\"mail\")" /></label>

                    </fieldset>
                    
                    <div><input type="submit" value="Enregistrer" /></div>
                    
                    </form>';
            		
                }else{
                	
                    echo '
                    <form onsubmit="f_sendPassMail(); return false;">

                    <fieldset id="id_mail"> <!--<legend>Mot de passe oubli&eacute;</legend>-->
                    
                    <label for="email"><span>Email</span>
                	<input type="text" id="email" name="email" /></label>

                    </fieldset>
                    
                    <div><input type="submit" value="Envoyer" /></div>
                    
                    </form>';
                }
            
            }else{formulaire_login();}
            ?>
            
		</div>
			<div id="banvisit"><form method="POST" action="infinity.html"><div><input type="submit" name="visiteur" value="Mode Visiteur"></div></form></div>
		</div>
        <div id="navcontainer">
        	<ul id="navlist">
        		<li><a href='?status=new'>nouveau compte</a></li>
        		<li><a href='?status=pass';>mot de passe oubli&eacute;</a></li>
        	</ul>
        </div>
        
        </div>    

		<div id="myAlternativeContent">
				<a href="http://www.adobe.com/go/getflashplayer">
					<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
				</a>
				<h1>Florent di Bartolo - Visual Artist - Freelance - Paris</h1>
				<h2>Video - Video Installation - Animation - Online Application</h2>
		</div>
	</body>
</html>